
<h3 class="forum_title" id="{id}"> {name} </h3>

<table border="0" class="forum">
	<tr>
		<th>Thread</th>
		<th>Latest Post</th>
		{cond:admin}
		<th>
			{anchor:'forum/admin/delete/{id}/{parent_id}', 'Delete', 'class = "admin"'}
		</th>
		{/cond:admin}
	</tr>
	
	{if:{empty} == 1}
	
	<td colspan={cond:admin}"3"{/cond:admin}{not_admin}"2"{/not_admin} style="width: 50em; padding: 1em">
		There are no threads in this forum.
		{cond:user}You can be the first to {anchor:'topic/add/{id}', 'create one'}.{/cond:user}
	</td>
	
	{else}
	
	{topics}
	
	<? $newest = $this->Post->get_newest($topic['id']) ?>

	<tr class="single_thread">

		<td class="name" valign="top">{anchor:'topic/view/{t_id}', '{t_name}'}</td>
		
		<td class="latest" {not_admin}style="width: 27.5em"{/not_admin}>
			Newest: <?= anchor('topic/view/'.$newest['parent_id'], mdate('%d %F %h:%i %A', gmt_to_local($newest['created'], $this->_user['timezone'], $this->_user['daylight_savings'])) ) ?>
			<br/>
			By: <?= anchor('member/profile/view/'.$newest['user_id'], $newest['username']) ?>
		</td>

		{cond:admin}
		<td class="delete">{anchor:'topic/admin/delete/{t_id}/{id}', 'X', 'class="admin delete_confirm"'}</td>
		{/cond:admin}
	</tr>
	{/topics}
	
	{/endif}
	
</table>
{cond:user}
{anchor:'topic/add/{id}', 'New thread'}
{/cond:user}

{cond:admin_box}
{/cond:admin_box}